<div class="list-container">
<div class="pt-3 pb-0 pr-3 pl-3 back"> <img src="/images/left-arrow.svg" width="20" height="20" class="d-inline-block align-top" alt=""> <a href="/roles">Roles</a> </div>
<h4 class="p-3 m-0">Edit Role</h4>
<div class="col-12">
<div class="card col-12">
  <%= form_for @changeset, role_path(@conn, :update, @role), [as: :role], fn f -> %>
  <div class="form-group row ">
    <%= input f, :name, nil, description: "Give name for this role.", is_horizontal: true %>
  </div>
  <div class="form-group row ">
    <%= input f, :description, nil, description: "Add a short description for this role.", is_horizontal: true %>
  </div>
  <div class="form-group row ">
    <label for="inputEmail3" class="col-sm-3 col-form-label">
      <div class="label ">
        Permissions
      </div>
      <div class="label-txt">Select permission/s for this role.</div>
    </label>
    <div class="col-sm-9">           
      <%= multiple_select(f, :permissions, formatted_list(:permissions),
        value: selected_permissions(@role.permissions), class: "full-width w-100 mb-3",
        "data-init-plugin": "select2") %>   
    </div>
  </div>
  <div class="form-group row stickformbutton">
    <div class="col-sm-10">
      <%= submit "Submit", class: "btn btn-primary submit-btn float-right" %>
      <%= link("Cancel", to: role_path(@conn, :index), class: "btn btn-secondary btn-outline-secondary float-left", type: "button") %>
    </div>
  </div>
  <% end %>
</div>
<div></div>
